import './assets/main.css'
/* iconfont图标 */
import './assets/icons/iconfonts/iconfont.css'

import { createApp } from 'vue'
import App from './App.vue'

const app = createApp(App)

// 全局mixin
import mixins from '@/mixins'
app.use(mixins)

// 全局指令
import defineDirective from '@/directives'
app.use(defineDirective)

//svg插件需要配置代码
import 'virtual:svg-icons-register'
//引入自定义插件对象:注册整个项目全局组件
import gloalComponent from '@/components'
app.use(gloalComponent)

// 引入全局方法
import * as utils from '@/utils'
app.config.globalProperties.$utils = utils

// element-plus使用
import ElementPlus from 'element-plus'
import 'element-plus/dist/index.css'
import zhCn from 'element-plus/dist/locale/zh-cn.mjs'
app.use(ElementPlus, { locale: zhCn })

// pinia
import store from '@/store'
app.use(store)

//添加事件管理者'passive'，来阻止'touchstart'事件，让页面更加流畅。 解决chrome下的warning问题
import 'default-passive-events'
// 引入路由
import router from './router'
app.use(router)

app.mount('#app')
